package com.sand.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "houserecord", schema = "ssh_pro", catalog = "")
public class HouserecordEntity {
    /**
     * @author <achao1441470436@gmail.com>
     * @since 2021/11/28/028 14:46
     */
    private int rid;
    private int houseId;
    private Long browseNumber;
    private Long collectionNumber;
    private String status;
    private String auditStatus;

    @Id
    @Column(name = "rid")
    public int getRid() {
        return rid;
    }

    public void setRid(int rid) {
        this.rid = rid;
    }

    @Basic
    @Column(name = "houseId")
    public int getHouseId() {
        return houseId;
    }

    public void setHouseId(int houseId) {
        this.houseId = houseId;
    }

    @Basic
    @Column(name = "browseNumber")
    public Long getBrowseNumber() {
        return browseNumber;
    }

    public void setBrowseNumber(Long browseNumber) {
        this.browseNumber = browseNumber;
    }

    @Basic
    @Column(name = "collectionNumber")
    public Long getCollectionNumber() {
        return collectionNumber;
    }

    public void setCollectionNumber(Long collectionNumber) {
        this.collectionNumber = collectionNumber;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        HouserecordEntity that = (HouserecordEntity) o;
        return rid == that.rid && houseId == that.houseId && Objects.equals(browseNumber, that.browseNumber) && Objects.equals(collectionNumber, that.collectionNumber);
    }

    @Override
    public int hashCode() {
        return Objects.hash(rid, houseId, browseNumber, collectionNumber);
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "auditStatus")
    public String getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }
}
